package com.techshine.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.techshine.entity.Constant;
import org.springframework.stereotype.Service;

import com.techshine.entity.Msg;
import com.techshine.mapper.MsgMapper;
import com.techshine.service.MsgService;

 
/** 
 * 说明： 留言
 * 
 */
@Service
public class MsgServiceImpl implements MsgService {
	
	@Resource
	private MsgMapper msgMapper;
	@Override
	public Msg queryByKey(String id)throws Exception{
		return msgMapper.queryByKey(id);
	}
	@Override
	public List<Msg> queryListByPage(Msg entity)throws Exception{
		return msgMapper.queryListByPage(entity);
	}
	@Override
	public List<Msg> queryList(Msg entity)throws Exception{
		return msgMapper.queryList(entity);
	}
	@Override
	public void insert(Msg entity)throws Exception{
		msgMapper.insert(entity);
	}
	@Override
	public void insertSelective(Msg entity)throws Exception{
		 msgMapper.insertSelective(entity);
	}
	@Override
	public void update(Msg entity)throws Exception{
	 	msgMapper.update(entity);
	}
	@Override
	public void updateByKeySelective(Msg entity)throws Exception{
		 msgMapper.updateByKeySelective(entity);
	}
	public void delete(Msg entity)throws Exception{
		 msgMapper.delete(entity);
	}
	@Override
	public void delmore(String ids) throws Exception {
		// TODO Auto-generated method stub
		String[] split = ids.split(",");
		Msg node=new Msg();
		for(String id:split) {
			node.setId(Integer.parseInt(id));
			msgMapper.delete(node);
		}
	}

	@Override
	public Constant finddoot(Constant constant) {
	Constant constant111=	msgMapper.finddoot(constant);
		return constant111;
	}


}

